Previous Thread
Next Thread
Print Thread
Rate Thread
#311792 10/20/2006 10:02 AM
Joined: Nov 2003
Posts: 329
Beta Tester
Beta Tester
Offline
Joined: Nov 2003
Posts: 329
Hi this was a hack that i previously used in classic,
although it was an External Loggin i also used it
to only allow registered members to see certain web pages.
By removing the actual Login feilds and just ran
the check.

Is there a simular code for v7 Threads that i coud adopt?

This is the code i used previously.
UBB Classic.
Cookie.inc.php
Code
 <script type="text/javascript">
<!--
function getCookie(name) {
var cname = name + "=";
var dc = document.cookie;

if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) {
end = dc.length;
} // end if
return (dc.substring(begin, end));
} // end if
} // end if
return null;
}
//-->
</script>


Cookiediplay.inc.php

Code
 <script type="text/javascript">
<!--
var user_cookie = getCookie('ubberxxxxx.xxxx');
if(''==user_cookie || null==user_cookie) {
//document.writeln('<div class="small">You are not logged in.' , '<br />
<a href="http://www.xxxx/ultimatebb.cgi">Login</a> or
<a href="http://www.xxxx/cgi-bin/ultimatebb.cgi?ubb=agree">Register</a></div>')
} else {
var user_array=user_cookie.split("&");
user_array[2] = unescape(user_array[2]);
document.writeln(user_array[2]);
//document.writeln('Hello, ', user_array[2]);
//document.writeln('<br />[<a title="Click here to log out.
" href="http://www.xxxx/cgi-bin/ultimatebb.cgi</cgi-bin/ultimatebb.cgi?ubb=logoff">','log out</a>]');
}
//-->
</script>



Any help would be appreciated thanks smile
As it can be handy smile


BOOM 7.6.+ rocks....
Sponsored Links
Joined: Dec 2006
Posts: 1
Lurker
Lurker
Offline
Joined: Dec 2006
Posts: 1
i am looking for the answer to this post as well. anybody knows how the answer?

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
hmmm.. I need to find the answer for this as well - stay tuned smile


- Allen wavey
- What Drives You?
Joined: Jan 2000
Posts: 5,834
Likes: 20
UBBDev Owner
Time Lord
UBBDev Owner
Time Lord
Joined: Jan 2000
Posts: 5,834
Likes: 20
I'm putting off until someone else figures it out wink hehe...


UBBDev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.threads: My UBB Themes, My UBB Scripts
Joined: Nov 2003
Posts: 329
Beta Tester
Beta Tester
Offline
Joined: Nov 2003
Posts: 329
Little bit of a bump smile
Seeing that its New year.

Ive been digging around the files etc,
and dont be able to trace this?

If we all have a dig every now and then we should be able
to figure this out...

Unless its been done and its in another thread?

I get lost when javascript takes over frown


BOOM 7.6.+ rocks....
Sponsored Links
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
it's not practical to handle this via javascript.

I've been working on a user authorization class (mostly it's the user class from ubbthreads.inc.php, but I'm writing it from scratch to avoid any issues with distribution)

I've only got to work on permissions, I believe I can have it done later this week, but right now I gotta work on some other things


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 701
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 13
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)